for (var xm = x - 1; xm <= x + 1; xm++) {
  for (var ym = y - 1; ym <= y + 1; ym++) {
    if (xm >= 0 && ym >= 0 && xm < XN && ym < YN) {
      if (that.data.ClassArray[xm][ym] == 0) {
        if (!(xm == x && ym == y)) {
          that.leftClick(xm, ym)
        }

      }
    }
  }
}

for (var xm = x - 1; xm <= x + 1; xm++) {
  for (var ym = y - 1; ym <= y + 1; ym++) {
    if (xm >= 0 && ym >= 0 && xm < XN && ym < YN) {
      if (that.data.ClassArray[xm][ym] == 0) {
        if (!(xm == x && ym == y)) {
          that.leftClick(xm, ym);
        }
      }
    }
  }
}
var testfx = {
  
setGameData: function() {
  var that = this;
  var local;
  switch (that.data.leiNum) {
    case 10: {
      if (parseInt(wx.getStorageSync('BestTime1')) == 99999) {
        that.data.bestTime = '暂无记录'
      }
      else {
        that.data.bestTime = wx.getStorageSync('BestTime1');
      }

      break;
    }
    case 40: {
      if (parseInt(wx.getStorageSync('BestTime2')) == 99999) {
        that.data.bestTime = '暂无记录'
      }
      else {
        that.data.bestTime = wx.getStorageSync('BestTime2');
      }
      break;
    }
    case 99: {
      if (parseInt(wx.getStorageSync('BestTime3')) == 99999) {
        that.data.bestTime = '暂无记录'
      }
      else {
        that.data.bestTime = wx.getStorageSync('BestTime3');
      }
      break;
    }
  }
  that.setData({
    bestTime: that.data.bestTime,
  })

},

}